<div class="avisos"><p style="color: green"><%= flash[:music] %></p></div>
<% unless @current_user.blank? %>

  <h2>Suas Músicas Compradas</h2>

  <table>
    <tr>
      <th>Artista</th>
      <th>Música</th>
      <th>Compositor</th>
    </tr>
  
          <% for music in @my_musics %>
      <tr>
        <td><%= music.artist.name %></td>
        <td><%= music.name %></td>
        <td><%= music.composer_name %></td>
    
        <td><%= link_to 'Download', { :controller => 'musics', :action => 'download', :id => music }, :method => :post %></td>
      </tr>
    <% end %>
  </table>

<% end %>

<% unless @current_user.blank? %>
  <div id="credits"><p>Você tem: <strong> <%= @current_user.credits %> </strong> créditos!</p></div>
<% end %>